export const getGetParams = function (url) {
  const urlObj = new URL(url);
  let searchParamsString = urlObj.search;

  // 检查是否有片段标识符
  if (urlObj.hash) {
    // 提取片段标识符中的查询参数部分
    const hashParts = urlObj.hash.split('?');
    if (hashParts.length > 1) {
      const hashParams = new URLSearchParams(hashParts[1]);
      for (const [key, value] of hashParams.entries()) {
        searchParamsString += `&${key}=${value}`;
      }
    }
  }

  const params = new URLSearchParams(searchParamsString);
  const paramsMap = new Map();

  for (const [key, value] of params.entries()) {
    paramsMap.set(key, value);
  }

  return paramsMap;
}
